package com.iurac.service;

import com.iurac.domain.User;
import com.iurac.exception.LoginException;
import com.iurac.exception.ManageException;
import com.iurac.vo.UserVo;

import java.util.List;
import java.util.Map;

public interface UserService {
    User login(String account, String password, String role) throws LoginException;

    String getBorrowCountById(String id);

    List<UserVo> getUsersByCondition(String username, String account, String phone, String[] sex, String[] role);

    Map<String, Object> getDateAboutUser();

    boolean deleteUserById(String id) throws ManageException;

    boolean updateUser(User user) throws ManageException;

    boolean saveUser(User user) throws ManageException;

    boolean updatePhone(String id, String phone) throws ManageException;

    User getUserById(String id);

    boolean updatePassword(String id, String password) throws ManageException;

    UserVo getUserByAccount(String account);

    boolean register(User user) throws ManageException;
}
